Kill excel object

Hello,

I am doing excel export in DOORS. I could able to save the file with the use of "cExcelMethodSaveAs" method. But the excel dialog was still exists in the task bar. I was releasing the object with "oleCloseAutoObject" object. Even couldnt close the excel object. please help me.

thanks in advance,
Muthurani M
muthurani - Tue Dec 28 10:03:38 EST 2010

Re: Kill excel object
OurGuest - Thu Dec 30 11:51:35 EST 2010

I am thinking you want to close the excel application with a close command sent to excel before you close the ole object.

After you close the excel application you then release the ole object.

Re: Kill excel object
Zetareticuli - Wed Jan 05 13:58:17 EST 2011

It sounds like you want to be able to close excel from within your DOORS script. If that's the intent, you'll need to pass excel an application.quit OLE command. It would probably be something like:
oleMethod(objExcel, "Quit")

Re: Kill excel object
Mathias Mamsch - Thu Jan 06 06:27:55 EST 2011

I noticed, that even sometimes after calling "Quit" on the Excel object, the excel ole application server will stay alive, since there are still oleHandles in use by DOORS.

You can kill "Excel.exe" by issuing a "taskkill /F /IM excel.exe" on the commandline, but that would kill ALL excel instances on the computer (including all current excel sheets the user has in work). So I strongly reccomend you to not do this, if you are doing an application for clients. The only way to get excel to quit properly is to release all the OLE handles that are allocated in the proper order (so that circle references are resolved correctly).

Maybe this helps, regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS